package com.kkb.robotcustomerservice.service.impl;

import com.kkb.robotcustomerservice.dao.GeneralProblemsDao;
import com.kkb.robotcustomerservice.entities.GeneralProblems;
import com.kkb.robotcustomerservice.service.GeneralProblemsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: lqk
 * @Description:
 * @Date Created in 2020-11-25 16:40
 * @Modified By:
 */
@Service
public class GeneralProblemsServiceImpl implements GeneralProblemsService {
    @Autowired
    GeneralProblemsDao generalProblemsDao;

    @Override
    public int addProblems(GeneralProblems generalProblems) {
        return generalProblemsDao.insert(generalProblems);
    }

    @Override
    public int deleteProblemsById(int queId) {
        return generalProblemsDao.deleteById(queId);
    }

    @Override
    public List<GeneralProblems> findAllProblems() {
        return generalProblemsDao.selectList(null);
    }

    @Override
    public List<GeneralProblems> findProblems(List<Integer> queIdList) {
        return generalProblemsDao.selectByIdList(queIdList);
    }

}
